home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 119
/
MOBICLIC 119.ISO
/
pc
/
DATA
/
DCV119
/
DCV119_01
/
DCV119_01.swf
/
scripts
/
frame_21
/
DoAction.as
Wrap
Text File
|
2009-11-16
|
19KB
|
650 lines
function activeFLE_D()
{
var _loc2_ = FEN_HAT.FLE_D;
_loc2_.pCible = FEN_HAT.ACCUEIL;
_loc2_.gotoAndPlay("E1");
_loc2_.onRollOver = function()
{
gereCursor(2);
this.gotoAndPlay("E2");
};
_loc2_.onRollOut = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
};
_loc2_.onPress = function()
{
this.gotoAndPlay("E1");
this.pCible["slideHAT_" + gSlide_HAT]._visible = false;
this.pCible["slideHAT_" + gSlide_HAT]._y = 0;
gSlide_HAT += 1;
this.pCible["slideHAT_" + gSlide_HAT]._visible = true;
FEN_HAT.SCROLL_._y = FEN_HAT.SCROLL_.pOrigY;
activeFLE_G();
if(gSlide_HAT == gNbSlide_HAT)
{
gereCursor(1);
this.gotoAndPlay("E0");
desactiveClip(this);
}
};
}
function activeFLE_G()
{
var _loc2_ = FEN_HAT.FLE_G;
_loc2_.pCible = FEN_HAT.ACCUEIL;
_loc2_.gotoAndPlay("E1");
_loc2_.onRollOver = function()
{
gereCursor(2);
this.gotoAndPlay("E2");
};
_loc2_.onRollOut = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
};
_loc2_.onPress = function()
{
this.gotoAndPlay("E1");
this.pCible["slideHAT_" + gSlide_HAT]._visible = false;
this.pCible["slideHAT_" + gSlide_HAT]._y = 0;
gSlide_HAT -= 1;
this.pCible["slideHAT_" + gSlide_HAT]._visible = true;
FEN_HAT.SCROLL_._y = FEN_HAT.SCROLL_.pOrigY;
activeFLE_D();
if(gSlide_HAT == 1)
{
gereCursor(1);
this.gotoAndPlay("E0");
desactiveClip(this);
}
};
}
function activeFEN_HAT()
{
var _loc4_ = FEN_HAT.ACCUEIL;
gNbSlide_HAT = 0;
gSlide_HAT = 1;
var _loc3_ = 1;
while(_loc3_ < 5)
{
if(photoStocker["I_" + gModuleName + "_H" + gModuleNum + "_0" + _loc3_] !== undefined)
{
var _loc6_ = _loc4_.createEmptyMovieClip("slideHAT_" + _loc3_,chercheDepthPlus(_loc4_,0));
var _loc5_ = "I_" + gModuleName + "_H" + gModuleNum + "_0" + _loc3_;
gNbSlide_HAT += 1;
this["mclR" + _loc3_] = new MovieClipLoader();
this["mclR" + _loc3_].loadClip(_global.gModulePath + moduleInfo.getResourceById(_loc5_).firstChild.attributes.src,_loc6_);
this["mclR" + _loc3_].onLoadInit = function(myClip)
{
if(myClip._name.split("_")[1] !== "1")
{
myClip._visible = false;
}
else
{
myClip._visible = true;
}
};
}
_loc3_ = _loc3_ + 1;
}
if(gNbSlide_HAT == 1)
{
_loc4_ = FEN_HAT.FLE_G;
_loc4_._visible = 0;
_loc4_ = FEN_HAT.FLE_D;
_loc4_._visible = 0;
}
else
{
activeFLE_D();
}
_loc4_ = FEN_HAT.BT_FERMER;
_loc4_.onRollOver = function()
{
gereCursor(2);
this.gotoAndPlay("E2");
};
_loc4_.onRollOut = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
};
_loc4_.onPress = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
removeMovieClip("FEN_HAT");
};
_loc4_ = FEN_HAT.SCROLL_;
_loc4_.pBar = FEN_HAT.SCROLL_BAR;
_loc4_.pOrigY = _loc4_._y;
_loc4_.pDiff = _loc4_.pOrigY - _loc4_.pBar._y;
_loc4_.pMaxY = _loc4_.pBar._y + _loc4_.pBar._height - _loc4_.pDiff - _loc4_._height;
_loc4_.distSCROLL = _loc4_.pMaxY - _loc4_.pOrigY;
_loc4_.onRollOver = function()
{
gereCursor(3);
this.gotoAndPlay("E2");
};
_loc4_.onRollOut = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
};
_loc4_.onPress = function()
{
this.pCible = FEN_HAT.ACCUEIL["slideHAT_" + gSlide_HAT];
this.pCibleMaskHAT = FEN_HAT.masque_HAT;
gereCursor(4);
this.onEnterFrame = function()
{
if(this.pCible.pDistSLIDE == undefined)
{
this.pCible.pDistSLIDE = this.pCible._height - this.pCibleMaskHAT._height;
}
if(_ymouse - this._height <= this.pOrigY)
{
this._y = this.pOrigY;
}
else if(_ymouse - this._height >= this.pMaxY)
{
this._y = this.pMaxY;
}
else
{
this._y = _ymouse - this._height;
}
pCent = (this._y - this.pOrigY) * 100 / this.distSCROLL;
this.pCible._y = (- this.pCible.pDistSLIDE) * pCent / 100;
updateAfterEvent();
};
};
_loc4_.onRelease = _loc4_.onReleaseOutside = function()
{
if(this.hitTest(_xmouse,_ymouse,true))
{
gereCursor(3);
}
else
{
gereCursor(1);
}
delete this.onEnterFrame;
};
_loc4_ = FEN_HAT.ZONE;
_loc4_.useHandCursor = 0;
_loc4_.onRollOver = function()
{
};
_loc4_.onRollOut = function()
{
};
_loc4_.onPress = function()
{
};
}
function adapteImage(myC)
{
if(myC._width > myC._height)
{
var _loc2_ = cadreWidth * 100 / myC._width;
if(myC._height * _loc2_ / 100 > cadreHeight)
{
_loc2_ = cadreHeight * 100 / myC._height;
}
}
else
{
_loc2_ = cadreHeight * 100 / myC._height;
if(myC._width * _loc2_ / 100 > cadreWidth)
{
_loc2_ = cadreWidth * 100 / myC._width;
}
}
myC._width = myC._width * _loc2_ / 100;
myC._height = myC._height * _loc2_ / 100;
var _loc4_ = (cadreWidth - myC._width) / 2;
myC._x = _loc4_;
var _loc3_ = (cadreHeight - myC._height) / 2;
myC._y = _loc3_;
myC._visible = true;
}
function afficheImage_R(lNum, lCode)
{
this["CLIP_PHOTO_0" + (lNum + 1)].gotoAndPlay("E1");
this["CLIP_PHOTO_0" + (lNum + 1)]._alpha = 0;
this["_R0" + (lNum + 1)].mcImage = this["CLIP_PHOTO_0" + (lNum + 1)];
var _loc5_ = this["CLIP_PHOTO_0" + (lNum + 1)].ACCUEIL;
_loc5_.id = lCode;
var _loc9_ = _loc5_.createEmptyMovieClip("swfHolder_" + lNum,chercheDepthPlus(_loc5_,0));
this["mclR" + lNum] = new MovieClipLoader();
this["mclR" + lNum].loadClip(_global.gModulePath + moduleInfo.getResourceById(lCode).firstChild.attributes.src,_loc9_);
this["mclR" + lNum].onLoadInit = function(myClip)
{
cadreWidth = 71.6;
cadreHeight = 50.5;
adapteImage(myClip);
myClip._parent._parent._alpha = 100;
};
var _loc4_ = lCode.substr(lCode.length - 1,1);
var _loc7_ = undefined;
var _loc8_ = undefined;
if(soundObjects[gCommentName + "I_R" + gimme2digits(gNoQuestion) + _loc4_] !== undefined)
{
_loc7_ = "I_R" + gimme2digits(gNoQuestion) + _loc4_;
}
if(soundObjects[gBruitageName + "B_I_R" + gimme2digits(gNoQuestion) + _loc4_] !== undefined)
{
_loc8_ = "B_I_R" + gimme2digits(gNoQuestion) + _loc4_;
}
this["_R0" + (lNum + 1)].pSon = _loc7_;
this["_R0" + (lNum + 1)].pBruit = _loc8_;
}
function finBruitageResultat()
{
gMcRepOk = undefined;
clearInterval(intervalTempoOk);
gListeQuestions.splice(0,1);
gListeQuestionsTotal.splice(0,1);
if(gResultat == "S")
{
gScore += 1;
}
if(gQuestion == gNbQuestions)
{
texte_NoQuestion.text = gQuestion + "/" + gNbQuestions;
texte_Score.text = gScore + "/" + gNbQuestions;
gotoAndStop("resultat");
play();
}
else
{
gNoQuestion = gListeQuestions[0];
gereTextes.videLM();
gQuestion += 1;
gotoAndStop("relance");
play();
}
}
if(photoStocker["I_" + gModuleName + "_H" + gModuleNum + "_01"] !== undefined)
{
BT_HATIER.gotoAndPlay("E1");
BT_HATIER.onRollOver = function()
{
gereCursor(2);
this.gotoAndPlay("E2");
};
BT_HATIER.onRollOut = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
};
BT_HATIER.onPress = function()
{
gereCursor(1);
this.gotoAndPlay("E1");
attachMovie("FEN_HAT","FEN_HAT",this._parent.getNextHighestDepth());
FEN_HAT._x = 165;
FEN_HAT._y = 15;
activeFEN_HAT();
};
}
else
{
BT_HATIER._visible = false;
}
i = 1;
while(i < 6)
{
this["texte_LMR" + i]._visible = 0;
i++;
}
gOk = 1;
texte_NoQuestion.text = gQuestion + "/" + gNbQuestions;
texte_Score.text = gScore + "/" + gNbQuestions;
gereTextes.afficheLM({codeLM:"LM_Q" + gimme2digits(gNoQuestion)});
gListeReponse = [];
var XmlLM = this.moduleInfo.returnNodeByPath("Module." + gLangue + ".LegendesMedias");
var lList = ["A","B","C","D","E"];
i = 4;
while(i >= 0)
{
var myClip = this["R" + gimme2digits(i + 1)];
var myClip2 = this["_R" + gimme2digits(i + 1)];
myClip.gotoAndPlay("E0");
myClip2._visible = false;
desactiveClip(myClip);
desactiveClip(myClip2);
if(gereTextes.getTextById(XmlLM,"LM_R" + gimme2digits(gNoQuestion) + lList[i]) == undefined)
{
lList.splice(i,1);
this["texte_LMR" + gimme2digits(i + 1)]._visible = 0;
}
i--;
}
gListeReponse = randomiseList(lList);
if(gListeReponse.length == 0)
{
var lList = ["A","B","C","D","E"];
i = 4;
while(i >= 0)
{
if(swfStocker["A_" + gModuleName + "_R" + gimme2digits(gNoQuestion) + lList[i]] == undefined)
{
lList.splice(i,1);
}
i--;
}
gType = "SWF";
gListeReponse = randomiseList(lList);
if(gListeReponse.length == 0)
{
var lList = ["A","B","C","D","E"];
i = 4;
while(i >= 0)
{
trace(gCommentName + "R" + gimme2digits(gNoQuestion) + lList[i]);
var lSon = soundObjects[gCommentName + "R" + gimme2digits(gNoQuestion) + lList[i]];
var lBruitage = soundObjects[gBruitageName + "B_R" + gimme2digits(gNoQuestion) + lList[i]];
if(lSon == undefined && lBruitage == undefined)
{
lList.splice(i,1);
}
i--;
}
gListeReponse = randomiseList(lList);
gType = "MP3";
if(gListeReponse.length == 0)
{
var lList = ["A","B","C","D","E"];
i = 4;
while(i >= 0)
{
if(photoStocker["I_" + gModuleName + "_R" + gimme2digits(gNoQuestion) + lList[i]] == undefined)
{
lList.splice(i,1);
}
i--;
}
gListeReponse = randomiseList(lList);
gType = "JPG";
}
}
}
else
{
gType = "LM";
}
trace(gType);
gDone = 0;
gResultat = undefined;
i = 0;
while(i < gListeReponse.length)
{
var myClip = this["R" + gimme2digits(i + 1)];
var myClip2 = this["_R" + gimme2digits(i + 1)];
myClip2.pNum = gimme2digits(i + 1);
myClip2.mcBouton = myClip;
myClip._visible = true;
myClip2._visible = true;
myClip.gotoAndPlay("E1");
myClip2.pCode = gListeReponse[i];
myClip2.pDone = 0;
trace(gType);
switch(gType)
{
case "LM":
gereTextes.afficheLM({codeLM:"LM_R" + gimme2digits(gNoQuestion) + gListeReponse[i],numR:gimme2digits(i + 1)});
var pClip = this["LM_R" + gimme2digits(gNoQuestion) + gListeReponse[i]];
var lH = 26.85;
if(pClip.LM.texte._height > lH)
{
pClip._y -= 13.4 * (pClip.LM.texte._height / lH - 1);
}
break;
case "SWF":
var myID = "A_" + gModuleName + "_R" + gimme2digits(gNoQuestion) + gListeReponse[i];
afficheImage_R(i,myID);
break;
case "JPG":
var myID = "I_" + gModuleName + "_R" + gimme2digits(gNoQuestion) + gListeReponse[i];
afficheImage_R(i,myID);
break;
case "MP3":
myClip2.mcSon = this["PICTO_SON_0" + (i + 1)];
myClip2.mcSon.gotoAndPlay("E1");
var lSon = soundObjects[gCommentName + "R" + gimme2digits(gNoQuestion) + lList[i]];
var lBruitage = soundObjects[gBruitageName + "B_R" + gimme2digits(gNoQuestion) + lList[i]];
if(lSon !== undefined)
{
myClip2.pSon = "R" + gimme2digits(gNoQuestion) + lList[i];
}
}
myClip2.gotoAndPlay("E1");
myClip2.pCode = gListeReponse[i];
if(myClip2.pCode == "A")
{
gMcRepOk = myClip2.mcBouton;
}
myClip2.onRollOver = function()
{
if(gDone == 0)
{
gereCursor(2);
this.mcBouton.gotoAndPlay("E2");
joueBruitage({nomSon:"B_" + this.pNum});
trace(this.pCode);
switch(gType)
{
case "SWF":
case "JPG":
if(this.pSon !== undefined)
{
joueSon({nomSon:this.pSon,zapBlock:"NOZAP_NOBLOCK",actionFin:"RIEN"});
}
if(this.pBruit !== undefined)
{
var _loc3_ = findID(this.pBruit);
if(_loc3_ !== 1)
{
joueBruitage({nomSon:this.pBruit});
}
else
{
joueBruitage({nomSon:this.pBruit,loopSon:2000});
}
}
this.mcImage.gotoAndStop("E2");
var _loc4_ = ANIM.createEmptyMovieClip("swfHolder_" + this.pCode,ANIM.getNextHighestDepth());
this.mclR_Q = new MovieClipLoader();
this.mclR_Q.loadClip(_global.gModulePath + moduleInfo.getResourceById(this.mcImage.ACCUEIL.id).firstChild.attributes.src,_loc4_);
break;
case "MP3":
myClip2.mcSon.gotoAndPlay("E2");
if(this.pSon !== undefined)
{
joueSon({nomSon:"R" + gimme2digits(gNoQuestion) + gListeReponse[Number(this.pNum)],zapBlock:"NOZAP_NOBLOCK",actionFin:"RIEN"});
}
else
{
joueBruitage({nomSon:"B_R" + gimme2digits(gNoQuestion) + gListeReponse[Number(this.pNum)]});
}
}
}
};
myClip2.onRollOut = function()
{
if(gDone == 0)
{
gereCursor(1);
this.gotoAndPlay("E1");
stopBruitage({nomSon:"B_" + this.pNum});
gereCursor(1);
this.mcBouton.gotoAndPlay("E1");
stopBruitage({nomSon:"B_" + this.pNum});
switch(gType)
{
case "SWF":
case "JPG":
if(this.pSon !== undefined)
{
stopComment();
}
if(this.pBruit !== undefined)
{
stopBruitage({nomSon:this.pBruit});
}
this.mcImage.gotoAndStop("E1");
removeMovieClip(ANIM["swfHolder_" + this.pCode]);
break;
case "MP3":
myClip2.mcSon.gotoAndPlay("E1");
if(this.pSon !== undefined)
{
stopComment();
}
else
{
stopBruitage({nomSon:"B_R" + gimme2digits(gNoQuestion) + gListeReponse[Number(this.pNum)]});
}
}
}
};
myClip2.onPress = function()
{
if(gDone == 0)
{
gereCursor(1);
stopBruitage({nomSon:"B_" + this.pNum});
gDone = 1;
trace(gMcRepOk + " ___________________________________ ");
if(this.pCode == "A")
{
PERSO_QUIZ.gotoAndPlay("S");
gResultat = "S";
if(gTempoRepOk == undefined)
{
joueBruitage({nomSon:"B_SUCCES",actionFin:"finBruitageResultat"});
}
else
{
joueBruitage({nomSon:"B_SUCCES"});
intervalTempoOk = setInterval(gClipGen,"finBruitageResultat",gTempoRepOk * 1000);
gMcRepOk.gotoAndPlay("E4");
}
}
else
{
this.mcBouton.gotoAndPlay("E3");
gResultat = "E";
PERSO_QUIZ.gotoAndPlay("E");
if(gTempoRepOk == undefined)
{
joueBruitage({nomSon:"B_ECHEC",actionFin:"finBruitageResultat"});
}
else
{
joueBruitage({nomSon:"B_ECHEC"});
intervalTempoOk = setInterval(gClipGen,"finBruitageResultat",gTempoRepOk * 1000);
gMcRepOk.gotoAndPlay("E4");
}
}
}
};
i++;
}
var lSon = soundObjects[gCommentName + "Q" + gimme2digits(gNoQuestion)];
if(lSon !== undefined)
{
joueSon({nomSon:"Q" + gimme2digits(gNoQuestion),actionFin:"RIEN"});
BT_RQUEST.gotoAndStop("E1");
BT_RQUEST.onRollOver = function()
{
this.gotoAndPlay("E2");
gereTextes.afficheIB({mc:this,codeIB:"IB94"});
joueBruitage({nomSon:"B_RQUEST"});
};
BT_RQUEST.onRollOut = function()
{
this.gotoAndPlay("E1");
gereTextes.masqueIB();
stopBruitage({nomSon:"B_RQUEST"});
};
BT_RQUEST.onPress = function()
{
this.gotoAndPlay("E3");
joueSon({nomSon:"Q" + gimme2digits(gNoQuestion),actionFin:"RIEN"});
gereTextes.masqueIB();
stopBruitage({nomSon:"B_RQUEST"});
};
}
else
{
BT_RQUEST.gotoAndStop("E0");
delete BT_RQUEST.onRollOver;
delete BT_RQUEST.onRollOut;
delete BT_RQUEST.onPress;
}
if(swfStocker["A_" + gModuleName + "_Q" + gimme2digits(gNoQuestion)] == undefined)
{
if(photoStocker["I_" + gModuleName + "_Q" + gimme2digits(gNoQuestion)] == undefined)
{
var myID = "A_" + gModuleName + "_Q00";
}
else
{
var myID = "I_" + gModuleName + "_Q" + gimme2digits(gNoQuestion);
}
}
else
{
var myID = "A_" + gModuleName + "_Q" + gimme2digits(gNoQuestion);
}
var photoholderNom = ANIM.createEmptyMovieClip("swfHolder",chercheDepthPlus(ANIM,0));
this.mclQ = new MovieClipLoader();
this.mclQ.loadClip(_global.gModulePath + moduleInfo.getResourceById(myID).firstChild.attributes.src,photoholderNom);
if(myID.split("")[0] == "I")
{
this.mclQ.onLoadInit = function(myClip)
{
cadreWidth = 303.9;
cadreHeight = 343.4;
adapteImage(myClip);
};
}
var lBruitage = soundObjects[gBruitageName + "B_Q" + gimme2digits(gNoQuestion)];
if(lBruitage !== undefined)
{
PICTO_SON_Q.gotoAndPlay("E1");
PICTO_SON_Q.onRollOver = function()
{
this.gotoAndPlay("E2");
joueBruitage({nomSon:"B_Q" + gimme2digits(gNoQuestion)});
};
PICTO_SON_Q.onRollOut = function()
{
this.gotoAndPlay("E1");
stopBruitage({nomSon:"B_Q" + gimme2digits(gNoQuestion)});
};
}
var lSon = soundObjects[gCommentName + "RQ" + gimme2digits(gNoQuestion)];
if(lSon !== undefined)
{
PICTO_SON_Q.gotoAndPlay("E1");
PICTO_SON_Q.onRollOver = function()
{
this.gotoAndPlay("E2");
joueSon({nomSon:"RQ" + gimme2digits(gNoQuestion),zapBlock:"NOZAP_NOBLOCK",actionFin:"RIEN"});
};
PICTO_SON_Q.onRollOut = function()
{
this.gotoAndPlay("E1");
stopComment();
};
}
stop();